From: Matthias Clasen Date: Fri, 16 Sep 2011 13:42:43 +0000 (-0400) Subject: status: don't show 'Show Keyboard Layout' on the login screen X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7704 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b5fa48f48589e8a77258ed408162eddab7dfa959;p=gnome-shell.git status: don't show 'Show Keyboard Layout' on the login screen It does not make a great amount of sense to have this function on the login screen. And worse, it does not work, since the greeter is currently a modal dialog, so interaction with the opening window is impossible. https://bugzilla.gnome.org/show_bug.cgi?id=659164 --- diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js index 5a12df17a..3c8999753 100644 --- a/js/ui/status/keyboard.js +++ b/js/ui/status/keyboard.js @@ -67,11 +67,13 @@ XKBIndicator.prototype = { this._sync_config(); - this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); - this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, function() { - Main.overview.hide(); - Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]); - })); + if (global.session_type == Shell.SessionType.USER) { + this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); + this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, function() { + Main.overview.hide(); + Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]); + })); + } this.menu.addSettingsAction(_("Region and Language Settings"), 'gnome-region-panel.desktop'); },